package com.jf.mall.dao;

import com.jf.mall.domain.OrderItem;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-10-10
 * Time:19:22
 */
public interface OrderItemDAO {
    /**
     * 向数据库添加订单项信息
     * @param orderItem OrderItem对象
     * @return 成功返回受影响行数
     */
    public int insertOrderItem(OrderItem orderItem);

    /**
     * 根据订单ID, 从数据库查询订单项信息
     * @param orderId 订单ID
     * @return List<OrderItem>订单所有订单项数据  若订单项数据为空,返回null
     */
    public List<OrderItem> getOrderItemsByOrderId(String orderId);
}
